/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import javax.persistence.Entity;
import play.db.jpa.Model;

/**
 *
 * @author Herminio
 */
@Entity
public class Usuario extends Model {
    String codigo;
    String password;
    String rol;

    public Usuario(String codigo, String password, String rol) {
        this.codigo = codigo;
        this.password = password;
        this.rol = rol;
    }
    
    public static Usuario connect(String codigo, String password) {
        return find("byCodigoAndPassword", codigo, password).first();
    }

    public void setCodigo(String codigo) {
        this.codigo = codigo;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setRol(String rol) {
        this.rol = rol;
    }

    public String getCodigo() {
        return codigo;
    }

    public String getPassword() {
        return password;
    }

    public String getRol() {
        return rol;
    }
    
    
    
}
